<?php /*a:1:{s:82:"C:\Users\Administrator\Desktop\dixun_offer\application\index\view\index\index.html";i:1598495372;}*/ ?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" src="/static/comm/jquery-3.3.1/jquery-3.3.1.min.js"></script>
    <link rel="stylesheet" type="text/css" href="/static/comm/layui/css/layui.css" />
    <script type="text/javascript" src="/static/comm/layui/layui.all.js"></script>

</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo">帝讯报价系统</div>
        <!-- 头部区域（可配合layui已有的水平导航） -->
        <ul class="layui-nav layui-layout-left">
            <li class="layui-nav-item"><a href="/bjlist">报价列表</a></li>
            <li class="layui-nav-item"><a href="/">新建报价单</a></li>
        </ul>
        <!--
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item">
                <a href="javascript:;">
                    <img src="http://t.cn/RCzsdCq" class="layui-nav-img">
                    贤心
                </a>
                <dl class="layui-nav-child">
                    <dd><a href="">基本资料</a></dd>
                    <dd><a href="">安全设置</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item"><a href="">退了</a></li>
        </ul>
        -->
    </div>

    <div class="layui-body" style="padding: 5%;">
        <!-- 内容主体区域 -->
        <form class="layui-form" method="post" action="/oncli">
            <div class="layui-form-item">
                <div class="layui-form-mid ">基础信息</div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">报价表名称</label>
                <div class="layui-input-block">
                    <input type="text" name="dotitle" required lay-verify="required" placeholder="请输入报价表名称" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">报价表所属公司</label>
                <div class="layui-input-block">
                    <input type="text" name="docompany" required lay-verify="required" placeholder="请输入报价表所属公司" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">报价表作者</label>
                <div class="layui-input-block">
                    <input type="text" name="doauthor" required lay-verify="required" placeholder="请输入报价表作者" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">报价表成本价</label>
                <div class="layui-form-mid">￥</div>
                <div class="layui-input-inline">
                    <input type="text" name="doprice" required lay-verify="required" placeholder="请输入报价表成本价" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">制作周期</label>
                <div class="layui-input-inline">
                    <input type="text" name="docycle" required lay-verify="required" placeholder="请输入报价表成本价" autocomplete="off" class="layui-input">
                </div>
                <div class="layui-form-mid">工作日</div>
                <div class="layui-form-mid layui-word-aux">不包含设计所需要的时间</div>
            </div>
            <div class="layui-form-item">

                <div class="layui-inline">
                    <label class="layui-form-label">报价表赚取利润</label>
                    <div class="layui-input-inline" style="width: 150px;">
                        <input type="number" name="doprofit" placeholder="100以内的数字" autocomplete="off" class="layui-input">
                    </div>
                    <div class="layui-form-mid">%</div>

                    <div class="layui-form-mid layui-word-aux">填写成本价的百分比</div>
                </div>
            </div>
            <div class="layui-form-item" id="listfunction">
                <div class="layui-form-mid " >功能列表</div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-inline">
<!--                    <input type='button' class="layui-btn layui-btn-xs layui-btn-normal" id="addfunctiontype" value="+ 添加分类"/>-->
                    <input type="button" class="layui-btn layui-btn-xs layui-btn-normal" id="addfunction" value="+ 添加内容"/>
                </div>

            </div>
            <div class="layui-form-item" id="listmember">
                <div class="layui-form-mid ">人员列表</div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <input type='button' class="layui-btn layui-btn-xs layui-btn-normal" id="addmember" value="+ 添加人员"/>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
                </div>
            </div>
        </form>
    </div>

</div>
<script>
    var membersize=1;
    var functionsize=1;
    var functiontypesize=1;
    var form ;
    //JavaScript代码区域
    layui.use(['jquery', 'table', 'form', 'layer', 'laydate','element'], function(){
        var element = layui.element;
        form = layui.form;
        var $ = layui.$, table = layui.table, layer = layui.layer, laydate = layui.laydate, admin = layui.admin, router = layui.router();
        /**
         * 点击生成项目参与人员
         */
        $("#addmember").click(function () {
            var html = '<div class="layui-form-item"> ' +
                    '<div class="layui-inline"> ' +
                        '<label class="layui-form-label">项目参与人员职称</label> ' +
                        '<div class="layui-input-inline" style="width: 200px;"> ' +
                            '<input type="text" name="domposition[]" placeholder="请填写项目参与人员职称" autocomplete="off" class="layui-input"> ' +
                        '</div> ' +
                    '</div>' +
                    '<div class="layui-inline"> ' +
                        '<label class="layui-form-label">该职称人数</label> ' +
                        '<div class="layui-input-inline" style="width: 150px;"> ' +
                            '<input type="number" name="dommumber[]" placeholder="请输入该职称人数" autocomplete="off" class="layui-input"> ' +
                        '</div> ' +
                    '</div> ' +
                '</div>';
            $("#listmember").append(html);
            membersize++;
        });


        $("#addfunction").click(function(){
            var html = '<div class="layui-form-item"> ' +
                '<div class="layui-inline"> ' +
                '<label class="layui-form-label">功能名称</label> ' +
                '<div class="layui-input-inline" style="width: 200px;"> ' +
                '<input type="text" name="doftitle[]" placeholder="请填写功能名称" autocomplete="off" class="layui-input"> ' +
                '</div> ' +
                '</div>' +
                '<div class="layui-inline"> ' +
                '<label class="layui-form-label">功能描述</label> ' +
                '<div class="layui-input-inline" style="width: 150px;"> ' +
                '<input type="text" name="dofdescribe[]" placeholder="请输入功能描述" autocomplete="off" class="layui-input"> ' +
                '</div> ' +
                '</div>' +
                '<div class="layui-inline"> ' +
                '<label class="layui-form-label">功能重要性</label> ' +
                '<div class="layui-input-inline" style="width: 200px;"> ' +
                '<select name="doflevel[]" id="dofdescribe" lay-verify="required"> ' +
                '<option value="1">1</option>' +
                '<option value="2">2</option>' +
                '<option value="3">3</option>' +
                '<option value="4">4</option>' +
                '<option value="5">5</option>' +
                '</select>' +
                '</div> ' +
                '</div> ' +
                '</div>';
            $("#listfunction").append(html);
            form.render('select');
            functionsize++;
        });


        $("#addfunctiontype").click(function (){
            var html = '<div class="layui-form-item"> ' +
                    '<label class="layui-form-label">分类名称</label> ' +
                    '<div class="layui-input-inline" style="width: 200px;"> ' +
                        '<input type="text" name="doftitle'+functiontypesize+'" placeholder="请填写分类名称" autocomplete="off" class="layui-input"> ' +
                        '<div class="layui-input-block"> ' +
                            '<label class="layui-form-label id="functiontype'+functiontypesize+'">分类内容</label> ' +
                            '<div class="layui-input-inline">' +
                            '<input type="button" class="layui-btn layui-btn-xs layui-btn-normal" onclick="addfunction('+functiontypesize+')" value="+ 添加内容"/>' +
                            '</div>' +
                        '</div>' +
                    '</div> ' +
                '</div>';
            $("#listfunction").append(html);
            functiontypesize++;
        });
        //监听提交
        form.on('submit(formDemo)', function(data){
            layer.msg(JSON.stringify(data.field));
            return true;
        });

    });

</script>
</body>
</html>